package com.ms.mishitong.utils;


import com.ms.mishitong.entity.User;
import org.springframework.stereotype.Component;


@Component
public class ThroadLocal {
    private static ThreadLocal<User> threadLocal = new ThreadLocal<>();

    public static void set(User user){
        threadLocal.set(user);
    }

    public static User get(){
        return threadLocal.get();
    }

    public static void remove(){
        threadLocal.remove();
    }
}
